package com.work.xxzl.utils;


/**
 * 计算积分和等级 TODO
 * 
 * @author pyy
 * @data: 2016年3月6日 下午5:15:23
 * @version: V1.0
 */
public class RankUtils {
	public static String getRank(int experience) {
		String rank = "";
		if (experience < 10000) {
			rank = "小将";
		} else if (experience >= 10000 && experience <= 50000) {
			rank = "少将";
		} else if (experience >= 50000 && experience <= 100000) {
			rank = "中将";
		} else if (experience >= 100000 && experience <= 500000) {
			rank = "上将";
		} else if (experience >= 500000 && experience <= 1000000) {
			rank = "少校";
		} else if (experience >= 100000 && experience <= 2000000) {
			rank = "中校";
		} else if (experience >= 2000000 && experience <= 5000000) {
			rank = "上校";
		} else if (experience >= 5000000 && experience <= 10000000) {
			rank = "大校";
		} else if (experience >= 1000000) {
			rank = "元帅";
		}

		return rank;
	}

	public static int getIntegral(int commissionPoints) {
		int labeIc = 0;
//		if (commissionPoints < 50000) {
//			labeIc = R.drawable.image_lv1;
//		}else if (commissionPoints>=50000&&commissionPoints<500000) {
//			labeIc = R.drawable.image_lv2;
//		}else if (commissionPoints>=500000&&commissionPoints<1000000) {
//			labeIc = R.drawable.image_lv3;
//		}else if (commissionPoints>=1000000&&commissionPoints<2000000) {
//			labeIc = R.drawable.image_lv4;
//		}else if (commissionPoints>=2000000&&commissionPoints<5000000) {
//			labeIc = R.drawable.image_lv5;
//		}else if (commissionPoints>=5000000&&commissionPoints<10000000) {
//			labeIc = R.drawable.image_lv6;
//		}else if (commissionPoints>=10000000) {
//			labeIc = R.drawable.image_lv7;
//		}

		return labeIc;
	}
}
